﻿@model Enter.Mvc.Mall.Model.Category.CategoryModels
<div id="" class="category category-tree">
    <div class="cate-panel hierarchy-cate" id="J_CateNavigation">
        <div class="cate-item cate-item-search ">
            <ul class="first-ul">
                <li id="J_CateSibling"><a href="/Category/iwanttobuy"><b class="icon blueLeft"></b>所有类目
                </a>
                    <ul>
                        @if (Model != null)
                        {
                            <li><a href="/Product/search_product?nav=spu_cat&cat=@Model.cate.CNO"><b class="icon blueLeft">
                            </b>@Model.cate.CName </a>
                                @if (Model.MinCateList != null)
                                {
                                    var cat = Enter.Common.RequestStrHelper.GetStringFromRequest("cat");
                                    <ul id="J_CateItemList" class="cate-item-list cate-item-list-search">
                                        @for (var i = 0; i < Model.MinCateList.Count; i++)
                                        {
                                            var item = Model.MinCateList[i];
                                            var liclass = "";
                                            var spanclass = "noChildren noChildren-1";
                                            if (cat == item.CNO)
                                            {
                                                liclass = "selected search-selected";
                                            }
                                            if (i == Model.MinCateList.Count - 1)
                                            {
                                                spanclass = "noChildren";
                                            }
                                            <li class="@liclass"><span class="@spanclass"></span><a href="/Product/search_product?nav=spu_cat&cat=@item.CNO" title="@item.CName">@item.CName
                                            </a></li>
                                       
                                        }
                                    </ul>
                                }
                            </li>
                        }
                    </ul>
                </li>
            </ul>
        </div>
    </div>
</div>
